package com.tuoyu.peopletest.utils;


import android.view.View;

import com.blankj.utilcode.util.LanguageUtils;
import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.suke.widget.SwitchButton;
import com.tuoyu.peopletest.R;
import com.tuoyu.peopletest.common.Constant;

import java.util.Locale;


/**
 * 通用逻辑
 */
public class SCBizUtils {
    private final static String TAG = "SCBizUtils";


    /**
     * @param sex male/ female
     * @return
     */
    public static String getSexStr(String sex) {
        if (Constant.male.equals(sex)) {
            return "男";
        } else if (Constant.female.equals(sex)) {
            return "女";
        }

        return "";
    }


    public static boolean isZh() {
        Locale locale = LanguageUtils.getAppliedLanguage();

        if (locale != null && locale.getLanguage().equals("zh")) {
            return true;
        }
        if (locale != null && locale.getLanguage().equals("en")) {
            return false;
        }

        return true;
    }

}
